package org.zn.etl.jdbc;

import org.zn.etl.job.context.GlobalContextKey;

public class OracleSelect extends Select {

	
	public OracleSelect(){
		super.dbType="oracle";
	}
	
	
	public String getPageSelect() {
		
		StringBuilder sb = new StringBuilder();
		sb.append("SELECT * FROM  (  " + "	SELECT  page.*,ROWNUM rnum  FROM  " + "(");
		sb.append(sql);
		sb.append(" ) page  WHERE ROWNUM <= ${#" + GlobalContextKey.END_OFFSET + "} ) " + "WHERE rnum > ${#"
				+ GlobalContextKey.START_OFFSET + "}");
		return sql;
	}
	
	
}
